{extend name="common:base" /}

{block name="main"}
<style>
    .aaa:hover{
        transform: scale(1.5);
    }
</style>
<!--body wrapper start-->
<div class="wrapper">
    <div class="pull-left">
        <a href="javascript:history.go(-1)" data-toggle="tooltip" title="" class="btn btn-default" data-original-title="返回"><i class="fa fa-reply"></i></a>
    </div>
    <div class="row">
        <div class="col-md-12">
            <!--breadcrumbs start -->
            <ul class="breadcrumb panel">
                <li><a href="{:url('Index/index')}"><i class="fa fa-home"></i> 控制台</a></li>
                <li><a href="{:url('index')}">房间管理</a></li>
                <li class="active">房间列表</li>
            </ul>
            <!--breadcrumbs end -->
        </div>
    </div>
    <div class="row">
        <div class="col-sm-12">
            <!--<header class="panel-heading col-xs-12 ">-->
                <!--<div class="form-group">-->
                    <!--<a href="{:url('room/add')}"  class="btn btn-success" title="添加房间">添加房间</a>-->
                <!--</div>-->
            <!--</header>-->
            <section class="panel">
                <div class="panel-body">
                    <form class="ids" action="" method="post">
                        <table class="table">
                            <thead>
                            <tr>
                                <th>ID</th>
                                <th>房间号</th>
                                <th>图片</th>
                                <th>创建人</th>
                                <th>关键词</th>
                                <th>热度</th>
                                <th>管理员</th>
                                <th>时间</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            {volist name='data' id='v'}
                            <tr>
                                <td>{$v.id}</td>
                                <td>{$v.room_number}</td>
                                <td><img style="border-radius: 50%" height="50px" src="{$v.back_url}" class="aaa"></td>
                                <td>{$v.nickname}</td>
                                <td>{$v.key_words}</td>
                                <td>{$v.hot}</td>
                                <td>{$v.managers_str}</td>
                                <td>{$v.create_at}</td>
                                <td>
                                    <a href="{:url('room/edit',['id'=>$v['id']])}" class="fa fa-edit" title="编辑"></a>
                                    <a href="{:url('room/delete',['id'=>$v['id']])}" class="fa fa-times confirm " onclick="return confirm('确定删除?');" title="删除"></a>
                                </td>
                            </tr>
                            {/volist}

                            </tbody>
                        </table>
                    </form>

                </div>
            </section>
            {$page}
        </div>

    </div>
</div>
<script type="text/javascript" src="__JS__/layer/layer.js"></script>
<script type="text/javascript">
    function tui(id,way) {
        $.ajax({
            type: "post",
            url: "{:url('article/do_recommend')}",
            data: {'way':way,'id':id},
            dataType: "json",
            async: false,
            success: function(data) {
                var msg = data.msg;
                layer.msg(msg,{icon:6,time:1000});
                setTimeout(function(){
                    location.reload()},1000
                );
            }
        });
    }
</script>
<!--body wrapper end-->
{/block}
